package xin.mashibo.pattern.chainofresponsibility;

/**
 * 只解决指定编号的问题
 *
 * @author MaShibo
 * 日期 :  2019/1/24
 */
public class SpecialSupport extends Support {

    private int number;

    public SpecialSupport(String name, int number) {
        super(name);
        this.number = number;
    }

    @Override
    protected boolean resolve(Trouble trouble) {
        return trouble.getNumber() == number;
    }
}
